<!DOCTYPE html>
<style>
#target {
  text-decoration: underline;
}
</style>
<p id=target>This text should have under-positioned underline.</p>
<script>
if (window.testRunner)
  testRunner.waitUntilDone();
window.onload = function () {
  document.body.offsetTop; /* force layout */
  /* Theoretically setting style can reproduce the issue, but neither setting
     immediately nor requestAnimationFrame() work, so use setTimeout(). */
  setTimeout(function () {
    target.style.textUnderlinePosition = 'under';
    if (window.testRunner)
      testRunner.notifyDone();
  }, 10);
};
</script>
